package com.example.springbootjdbc.service.impl;

import com.example.springbootjdbc.dao.UsersDao;
import com.example.springbootjdbc.pojo.Users;
import com.example.springbootjdbc.service.UsersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @ClassName UsersServiceImpl
 * @Description UsersServiceImpl 用户管理业务层
 * @Author ZX
 * @Date 2020/5/26
 */
@Service
public class UsersServiceImpl implements UsersService {

    @Autowired
    private UsersDao usersDao;


    /**
     * @Description: addUser //查询不用加事务
     * @Param: [users]
     * @Return: void
     */
    @Override
    @Transactional
    public void addUser(Users users) {
        this.usersDao.insertUsers(users);
    }
}
